package com.itfreer.data.app.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.form.api.reflect.DictionaryField;
import com.itfreer.utils.file.FileMeta;

/**
 * 定义APP版本管理实体
 */
@Entity(name = "sso_app_version")
public class AppVersionEntity extends EntityBase implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@Id
	@Column(name = "s_id", length = 255, nullable = true)
	private String id;

	/**
	 * 所属的app id
	 */
	@Column(name = "s_infoid", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "p_appinfo", toFieldName = "infoName")
	private String infoid;

	/**
	 * 所属的app名称
	 */
	@Transient
	private String infoName;

	/**
	 * 版本号
	 */
	@Column(name = "s_version", length = 50, nullable = true)
	private String version;

	/**
	 * 版本编号
	 */
	@Column(name = "i_numversion", nullable = true)
	private Integer numversion;

	/**
	 * 更新内容
	 */
	@Column(name = "s_content", columnDefinition = "text", nullable = true)
	private String content;

	/**
	 * 上传
	 */
	@Column(name = "s_appfile", columnDefinition = "text", nullable = true)
	private String appfile;

	/**
	 * 更新时间
	 */
	@Column(name = "d_createtime", nullable = true)
	private java.util.Date createtime;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getInfoid() {
		return infoid;
	}

	public void setInfoid(String infoid) {
		this.infoid = infoid;
	}

	@Transient
	public String getInfoName() {
		return infoName;
	}

	public void setInfoName(String infoName) {
		this.infoName = infoName;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Integer getNumversion() {
		return numversion;
	}

	public void setNumversion(Integer numversion) {
		this.numversion = numversion;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public FileMeta[] getAppfile() {
		return super.getFileArray(appfile);
	}

	public void setAppfile(FileMeta[] appfile) {
		this.appfile = super.getFileString(appfile);
	}

	public java.util.Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(java.util.Date createtime) {
		this.createtime = createtime;
	}
}
